//
//  UIBarButtonItem-Extension.swift
//  SwiftWB
//
//  Created by 远成物流 on 2017/6/23.
//
//

import UIKit

extension UIBarButtonItem{
    ///便利构造函数 convenience
    convenience init(imageName:String) {
        
        let button = UIButton()
        button.setImage(UIImage(named:imageName), for: .normal)
        button.setImage(UIImage(named:imageName + "_highlighted"), for: .highlighted)
        button.sizeToFit()
        
        self.init(customView:button)
    }
}
